import { ManageDropdown } from '@/app/(private)/admin/stablecoins/[id]/_components/manage-dropdown'; import { ActivePill } from '@/components/blocks/active-pill/active-pill'; import { EvmAddress } from '@/components/blocks/evm-address/evm-address'; import type { TabItemProps } from '@/components/blocks/tab-navigation/tab-item'; import { TabNavigation } from '@/components/blocks/tab-navigation/tab-navigation'; import { PageHeader } from '@/components/layout/page-header'; import { EvmAddressBalances } from '@/components/ui/evm-address-balances'; import type { Metadata } from 'next'; import type { PropsWithChildren } from 'react'; import type { Address } from 'viem'; import { getStableCoinTitle } from './_components/data'; interface LayoutProps extends PropsWithChildren { params: Promise<{ id: string; }>; } export async function generateMetadata({ params }: LayoutProps): Promise { const { id } = await params; const stableCoin = await getStableCoinTitle(id); if (!stableCoin) { return { title: 'Stablecoin not found', }; } return { title: stableCoin?.name, openGraph: { images: [ { url: `/share/stablecoins/${id}/og`, width: 1280, height: 640, alt: stableCoin?.name, }, ], }, twitter: { images: [ { url: `/share/stablecoins/${id}/og`, width: 1280, height: 640, alt: stableCoin?.name, }, ], }, }; } const tabs = (id: string): TabItemProps[] => [ { name: 'Details', href: `/admin/stablecoins/${id}`, }, { name: 'Holders', href: `/admin/stablecoins/${id}/holders`, }, { name: 'Events', href: `/admin/stablecoins/${id}/events`, }, // { // name: 'Block list', // href: `/admin/stablecoins/${id}/blocklist`, // }, { name: 'Permissions', href: `/admin/stablecoins/${id}/token-permissions`, }, ]; export default async function FundsDetailLayout({ children, params }: LayoutProps) { const { id } = await params; const stableCoin = await getStableCoinTitle(id); return (
{stableCoin?.name} ({stableCoin?.symbol}) } subtitle={ } pill={} button={} />
{children}
); }